class BaseChartFormatter {
  String _value;

  dynamic toJson() {
    return this._value;
  }

  BaseChartFormatter.keepDefault(): this._value = "@FUNCTION@function(e){let str='';e.forEach((a)=>{str+=a.marker+a.seriesName+': ';if(a.seriesType==='bar')str+=a.value;else str+=a.value;if(a.seriesIndex!==e.length-1)str+='<br>'});return e[0].name+'<br>'+str}@FUNCTION@";

  BaseChartFormatter.fromFunction(String value)
      : this._value = "@FUNCTION@$value@FUNCTION@";

  BaseChartFormatter.fromString(String value) : this._value = value;
}
